include($ENV{IDF_PATH}/tools/cmake/toolchain-esp32.cmake)

SET(FORTE_ARCHITECTURE "FreeRTOSLwIP")



set(CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions")



message("CMAKE_C_FLAGS   used for this build: ${CMAKE_C_FLAGS}")
message("CMAKE_CXX_FLAGS used for this build: ${CMAKE_CXX_FLAGS}")


SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/esp_additions/arch/xtensa/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/lwip/port/freertos/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/lwip/port/esp32xx/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/esp_additions/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/esp_additions/include/freertos)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/portable/xtensa/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_common/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/port/xtensa/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/xtensa/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/lwip/lwip/src)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/xtensa)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/xtensa/esp32/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_rom/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_ringbuf/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_rom/include/linux)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_hw_support/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/hal/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/lwip/lwip/src/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/soc/esp32/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/lwip/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/lwip/port/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/lwip/port/esp32/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/hal/esp32/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/soc/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_system/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_timer/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/newlib/platform_include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/heap/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/freertos/include/esp_additions)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/driver/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/driver/gpio/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/driver/rmt/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/log/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/nvs_flash/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/spi_flash/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_partition/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_adc/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES $ENV{IDF_PATH}/components/esp_adc/esp32/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ../../Application/components/led_strip/include)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ../../Application/components/led_strip/interface)
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTE_INCLUDE_DIRECTORIES ../../Application/components/button/include)